<script language="javascript">
    $(document).ready(function() {
        $('#data_orden').dataTable( {
            "bJQueryUI": true,
            "sPaginationType": "full_numbers",
            "oLanguage": {
                "sLengthMenu": "Mostrar _MENU_ solicitudes por pagina",
                "sZeroRecords": "Ninguna solicitud encontrada :(",
                "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ Solicitudes",
                "sInfoEmpty": "Mostrando 0 a 0 de 0 Solicitudes",
                "sInfoFiltered": "(Filtrando de _MAX_ Solicitudes)"
            }
        } );
    } );
</script>

<article class="module width_full">
    <header><h3>Lista de Solicitudes</h3></header>
    <div class="module_content">
        <article class="breadcrumbs_content">
            <a href="<?php echo $this->url(array('action' => 'solicitud-add', 'id' => null)) ?>">Nueva Solicitud</a>
        </article>

        <table cellpadding="0" cellspacing="0" border="0" class="display" id="data_orden" width="100%">
            <thead>
                <tr>
                    <th>Codigo</th>
                    <th>Asunto</th>
                    <th>Detalle</th>
                    <th>Feha</th>
                    <th>Estado</th>
                    <th>Acciones</th>
                </tr>
            </thead>
            <tbody>

                <?php foreach ($this->solicitudes as $sol) : ?>
                    <tr>
                        <td><?php echo $sol->code_solicitud; ?></td>
                        <td><?php echo $sol->subject; ?></td>
                        <td><?php echo $sol->detail; ?></td>
                        <td><?php echo $sol->create_date; ?></td>
                        <td><?php echo $sol->status;  ?></td>
                        <td class="center">
                            <a href="<?php echo $this->url(array('action' => 'solicitud-edit', 'id' => $sol->id)) ?>" title="Editar">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_edit.png"/>
                            </a>
                            <span>&nbsp;&nbsp;&nbsp;</span>
                            <a href="<?php echo $this->url(array('action' => 'solicitud-view-from', 'id' => $sol->id)) ?>" title="Detalle">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_categories.png" alt="Ver detalle"/>
                            </a>
                            <a href="<?php echo $this->url(array('action' => 'solicitud-delete', 'id' => $sol->id)) ?>" title="Eliminar">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_trash.png" alt="Eliminar"/>
                            </a>
                        </td>
                    </tr>
                <?php endforeach; ?>
                    
            </tbody>
        </table>
    </div>
</article>